#pragma once
#include "ProgramOptions.h"

namespace WinRally {

	using namespace System;
	using namespace System::ComponentModel;
	using namespace System::Collections;
	using namespace System::Windows::Forms;
	using namespace System::Data;
	using namespace System::Drawing;
	using namespace WinRallyLT;

	/// <summary>
	/// Summary for MainWindow
	/// </summary>
	public ref class MainWindow : public System::Windows::Forms::Form
	{
	public:
		MainWindow(void)
		{
			InitializeComponent();
			//
			//TODO: Add the constructor code here
			//
		}

	protected:
		/// <summary>
		/// Clean up any resources being used.
		/// </summary>
		~MainWindow()
		{
			if (components)
			{
				delete components;
			}
		}
	private: System::Windows::Forms::Button^  reset_odo_1;
	private: System::Windows::Forms::RichTextBox^  Odo_Distance_1;
	private: System::Windows::Forms::RichTextBox^  Average_Distance_1;
	private: System::Windows::Forms::Button^  reset_avg_1;
	private: System::Windows::Forms::RichTextBox^  richTextBox1;
	private: System::Windows::Forms::Button^  button1;
	private: System::Windows::Forms::PictureBox^  pictureBox1;
	protected: 



	private:
		/// <summary>
		/// Required designer variable.
		/// </summary>
		System::ComponentModel::Container ^components;

#pragma region Windows Form Designer generated code
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		void InitializeComponent(void)
		{
			this->reset_odo_1 = (gcnew System::Windows::Forms::Button());
			this->Odo_Distance_1 = (gcnew System::Windows::Forms::RichTextBox());
			this->Average_Distance_1 = (gcnew System::Windows::Forms::RichTextBox());
			this->reset_avg_1 = (gcnew System::Windows::Forms::Button());
			this->richTextBox1 = (gcnew System::Windows::Forms::RichTextBox());
			this->button1 = (gcnew System::Windows::Forms::Button());
			this->pictureBox1 = (gcnew System::Windows::Forms::PictureBox());
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->pictureBox1))->BeginInit();
			this->SuspendLayout();
			// 
			// reset_odo_1
			// 
			this->reset_odo_1->Location = System::Drawing::Point(638, 120);
			this->reset_odo_1->Name = L"reset_odo_1";
			this->reset_odo_1->Size = System::Drawing::Size(100, 100);
			this->reset_odo_1->TabIndex = 0;
			this->reset_odo_1->Text = L"Reset";
			this->reset_odo_1->UseVisualStyleBackColor = true;
			// 
			// Odo_Distance_1
			// 
			this->Odo_Distance_1->Font = (gcnew System::Drawing::Font(L"Quartz", 56, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->Odo_Distance_1->ForeColor = System::Drawing::SystemColors::GrayText;
			this->Odo_Distance_1->Location = System::Drawing::Point(75, 128);
			this->Odo_Distance_1->Multiline = false;
			this->Odo_Distance_1->Name = L"Odo_Distance_1";
			this->Odo_Distance_1->ReadOnly = true;
			this->Odo_Distance_1->Size = System::Drawing::Size(520, 100);
			this->Odo_Distance_1->TabIndex = 1;
			this->Odo_Distance_1->Text = L"0.00 km";
			// 
			// Average_Distance_1
			// 
			this->Average_Distance_1->Font = (gcnew System::Drawing::Font(L"Quartz", 56, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->Average_Distance_1->ForeColor = System::Drawing::SystemColors::GrayText;
			this->Average_Distance_1->Location = System::Drawing::Point(75, 278);
			this->Average_Distance_1->Multiline = false;
			this->Average_Distance_1->Name = L"Average_Distance_1";
			this->Average_Distance_1->ReadOnly = true;
			this->Average_Distance_1->Size = System::Drawing::Size(520, 100);
			this->Average_Distance_1->TabIndex = 2;
			this->Average_Distance_1->Text = L"0.00 km";
			// 
			// reset_avg_1
			// 
			this->reset_avg_1->Location = System::Drawing::Point(638, 270);
			this->reset_avg_1->Name = L"reset_avg_1";
			this->reset_avg_1->Size = System::Drawing::Size(100, 100);
			this->reset_avg_1->TabIndex = 3;
			this->reset_avg_1->Text = L"Reset";
			this->reset_avg_1->UseVisualStyleBackColor = true;
			// 
			// richTextBox1
			// 
			this->richTextBox1->Font = (gcnew System::Drawing::Font(L"Quartz", 56, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->richTextBox1->ForeColor = System::Drawing::SystemColors::GrayText;
			this->richTextBox1->Location = System::Drawing::Point(143, 430);
			this->richTextBox1->Multiline = false;
			this->richTextBox1->Name = L"richTextBox1";
			this->richTextBox1->ReadOnly = true;
			this->richTextBox1->Size = System::Drawing::Size(520, 100);
			this->richTextBox1->TabIndex = 4;
			this->richTextBox1->Text = L"1.012";
			this->richTextBox1->TextChanged += gcnew System::EventHandler(this, &MainWindow::richTextBox1_TextChanged);
			// 
			// button1
			// 
			this->button1->Location = System::Drawing::Point(75, 13);
			this->button1->Name = L"button1";
			this->button1->Size = System::Drawing::Size(193, 92);
			this->button1->TabIndex = 5;
			this->button1->Text = L"Connect to Vehicle";
			this->button1->UseVisualStyleBackColor = true;
			this->button1->Click += gcnew System::EventHandler(this, &MainWindow::button1_Click);
			// 
			// pictureBox1
			// 
			this->pictureBox1->BackColor = System::Drawing::Color::Red;
			this->pictureBox1->Location = System::Drawing::Point(274, 13);
			this->pictureBox1->Name = L"pictureBox1";
			this->pictureBox1->Size = System::Drawing::Size(42, 41);
			this->pictureBox1->TabIndex = 6;
			this->pictureBox1->TabStop = false;
			// 
			// MainWindow
			// 
			this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
			this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
			this->ClientSize = System::Drawing::Size(784, 562);
			this->Controls->Add(this->pictureBox1);
			this->Controls->Add(this->button1);
			this->Controls->Add(this->richTextBox1);
			this->Controls->Add(this->reset_avg_1);
			this->Controls->Add(this->Average_Distance_1);
			this->Controls->Add(this->Odo_Distance_1);
			this->Controls->Add(this->reset_odo_1);
			this->Name = L"MainWindow";
			this->Text = L"WinRallyLT";
			this->Load += gcnew System::EventHandler(this, &MainWindow::MainWindow_Load);
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->pictureBox1))->EndInit();
			this->ResumeLayout(false);

		}
#pragma endregion
	private: System::Void MainWindow_Load(System::Object^  sender, System::EventArgs^  e) {
			 }
	private: System::Void label1_Click(System::Object^  sender, System::EventArgs^  e) {
			 }
	private: System::Void richTextBox1_TextChanged(System::Object^  sender, System::EventArgs^  e) {
			 }
			 // When Connect to... button is clicked, show the Program Options window
private: System::Void button1_Click(System::Object^  sender, System::EventArgs^  e) {
			 ProgramOptions^ F = gcnew ProgramOptions();
			 F->Show();
		 }
};
}

